//path:js/site-popup.js
define(function(require){
	var $=require("jq");
	function Popup(popup){
		var _this_=this;
		this.popup=popup;
		this.arrow=$(".arrow-switch",popup);
		this.popupCon=$(".pop-content",popup);
		this.popup.hover(function(){
			window.clearTimeout(this.timer1);
			this.timer=window.setTimeout(function(){
				_this_.show();
			},200);
		},function(){
			window.clearTimeout(this.timer);
			this.timer1=window.setTimeout(function(){
					_this_.hide();
			},200);

		});
	
	};
	Popup.prototype={
		show:function(){
			this.popupCon.addClass("pop-content-show");
			this.arrow.addClass("hover");
		},
		hide:function(){
			this.popupCon.removeClass("pop-content-show");
			this.arrow.removeClass("hover");
		}
		
		
	};

	Popup.init=function(popups){
		var _this=this;
		popups.each(function(){
			new _this($(this));
		});
		
	};
	//初始化所有弹窗
	Popup.init($(".J_Popup"));
});